package com.nacrtstudio.webgiftshop.model.shop.beans;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

import com.nacrtstudio.webgiftshop.core.beans.BaseBean;
import com.nacrtstudio.webgiftshop.model.shop.Address;
import com.nacrtstudio.webgiftshop.model.shop.Gift;
import com.nacrtstudio.webgiftshop.model.shop.Order;
import com.nacrtstudio.webgiftshop.model.shop.PackedGift;
import com.nacrtstudio.webgiftshop.model.shop.User;

@Entity
public class PackedGiftBean extends BaseBean implements PackedGift{
	private Long chosenGiftId;
	private Gift gift;
	private Double shippingPrice;
	private Order order;
	private String nameOfReceiver;
	private Address address;
	private String nameOfSender;
	private String messageText;
	private boolean wideAreaDelivery;
	
	public Long getChosenGiftId() {
		return chosenGiftId;
	}
	public void setChosenGiftId(Long chosenGiftId) {
		this.chosenGiftId = chosenGiftId;
	}
	@ManyToOne(targetEntity=GiftBean.class)
	public Gift getGift() {
		return gift;
	}
	public void setGift(Gift gift) {
		this.gift = gift;
	}
	public Double getShippingPrice() {
		return shippingPrice;
	}
	public void setShippingPrice(Double shippingPrice) {
		this.shippingPrice = shippingPrice;
	}
	@ManyToOne(cascade=CascadeType.ALL, targetEntity=OrderBean.class)
	public Order getOrder() {
		return order;
	}
	public void setOrder(Order order) {
		this.order = order;
	}
	@OneToOne(cascade=CascadeType.ALL,targetEntity=AddressBean.class)
	public Address getAddress() {
		return address;
	}
	public void setAddress(Address address) {
		this.address = address;
	}
	public String getMessageText() {
		return messageText;
	}
	public void setMessageText(String messageText) {
		this.messageText = messageText;
	}
	public String getNameOfReceiver() {
		return nameOfReceiver;
	}
	public void setNameOfReceiver(String nameOfReceiver) {
		this.nameOfReceiver = nameOfReceiver;
	}
	public String getNameOfSender() {
		return nameOfSender;
	}
	public void setNameOfSender(String nameOfSender) {
		this.nameOfSender = nameOfSender;
	}
	public boolean isWideAreaDelivery() {
		return wideAreaDelivery;
	}
	public void setWideAreaDelivery(boolean wideAreaDelivery) {
		this.wideAreaDelivery = wideAreaDelivery;
	}
}
